opening Preferences Window handling command setting up windows initializing application